<?php
namespace app\index\controller;

use think\Controller;
use think\Db;
use think\Request;
use think\Session;

// 判断是否登录
class Islogin extends Controller
{
    //初始化的方法
    public function _initialize(){

        $session = Session::get();
        
        
        //判断是否登录
        if(empty($session['hmy_user'])){

            //跳转到 登陆页
            $this->error('您好,请登录....',"index/Login/index");

		}
	}
}
